const Car = function () {
  this.color = "red";
  this.brand = "大众";
  this.mileage = 10000;
};

const car = new Car();

console.log("car:before", car);
// car:before Car { color: 'red', brand: '大众', mileage: 10000 }

car.color = "blue";
car.brand = "BMW";
car.mileage = 999;
car.sayHello = () => console.log("sayHello Func => ", "hello,world!");

console.log("car:after", car);
// car:after Car { color: 'blue', brand: 'BWM', mileage: 999 }
const bentch = Object.create(car);

console.log("bentch:", bentch);
console.log("bentch.color:", bentch.color);
console.log("bentch.brand:", bentch.brand);
console.log("bentch.mileage:", bentch.mileage);
// bentch: Car {}
// bentch.color: blue
// bentch.brand: BWM
// bentch.mileage: 999

bentch.sayHello();
// sayHello Func =>  hello,world!
